/**
*      author: Y_Yao
*      created: 2024-09-24 16:25:10
**/

#include<bits/stdc++.h>

using namespace std;
using LL = long long;
const int INF = 0x3f3f3f3f;
const double PI = 3.1415926;
int N,x1,y1,x2,y2,ret;
vector<pair<int,int>> pos;
vector<pair<int,int>> R;
bool vis[10];
double S;

double count(int k)
{
    int x = pos[k].first;
    int y = pos[k].second;
    double r = INF;
    r = min(r,(double)abs(y1-y));
    r = min(r,(double)abs(y2-y));
    r = min(r,(double)abs(x1-x));
    r = min(r,(double)abs(x2-x));
    for(auto e : R)
    {
        double d = sqrt(())
    }
}

void dfs(int k,double sum)
{
    if(k > N)
    {
        ret = max(ret,(int)sum);
        return;
    }
    double s = 0;
    double r = count(k);
    R.push_back(k);

    for(int i = 0;i < N;i++)
    {
        if(vis[i])continue;
        vis[i] = true;
        dfs(i,sum + s);
        vis[i] = false;
    }
}

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    cin >> N;
    cin >> x1 >> y1 >> x2 >> y2;
    S = abs(x1 - x2) * abs(y1 - y2);
    int t1,t2;
    for(int i = 0;i < N;i++)
    {
        cin >> t1 >> t2;
        pos.push_back({t1,t2});
    }

    dfs(1,0);
    return 0;
}